package com.github.prontera.domain;

import java.math.BigDecimal;
import java.time.OffsetDateTime;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.github.prontera.domain.enums.OrderTypeEnum;
import com.github.prontera.domain.enums.PayStatusEnum2;
import com.github.prontera.model.BasicDomain;
import com.github.prontera.util.converter.jackson.OffsetDateTimeToIso8601Serializer;

import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 
 * o_order-订单
 *
 */
@ToString
@EqualsAndHashCode(callSuper = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class Order extends BasicDomain{

	private static final long serialVersionUID = 1L;
    
	/**
	 * 订单编号
	 */
	@ApiModelProperty(value = "订单编号")
    private String tradeNo;
	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	@JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
    private OffsetDateTime createTime;
	/**
	 * 支付时间
	 */
	@ApiModelProperty(value = "支付时间")
	@JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
    private OffsetDateTime paySuccessTime;
	/**
	 * 支付金额
	 */
	@ApiModelProperty(value = "支付金额")
    private BigDecimal amount;
	/**
	 * 所属客户订单
	 */
	@ApiModelProperty(value = "所属客户订单")
    private Long clientId;
	/**
	 * 类型: 0:充值唐豆豆, 1:达人订单
	 */
	@ApiModelProperty(value = "类型: 0:充值唐豆豆, 1:达人订单")
    private OrderTypeEnum type;
	/**
	 * 状态, 0:待支付, 1:已支付,2:支付失败
	 */
	@ApiModelProperty(value = "状态, 0:待支付, 1:已支付,2:支付失败")
    private PayStatusEnum2 status;
	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "更新时间")
	@JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
    private OffsetDateTime updateTime;
	/**
	 * 原因
	 */
	@ApiModelProperty(value = "原因")
    private String reason;
	/**
	 * 响应参数
	 */
	@ApiModelProperty(value = "响应参数")
    private String reponseParams;
	/**
	 * 请求参数
	 */
	@ApiModelProperty(value = "请求参数")
    private String requestParams;
	/**
	 * 扩展参数
	 */
	@ApiModelProperty(value = "扩展参数")
    private String extParams;
	/**
	 *虚拟商品(服务)ID
	 */
	@ApiModelProperty(value = "虚拟商品(服务)ID")
	private Long serviceId;
	
    
    public Order(){
    
    }
    
    public Long getServiceId() {
		return serviceId;
	}

	public void setServiceId(Long serviceId) {
		this.serviceId = serviceId;
	}

	public String getTradeNo() {
        return this.tradeNo;
    }
    
    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }
    public OffsetDateTime getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(OffsetDateTime createTime) {
        this.createTime = createTime;
    }
    public OffsetDateTime getPaySuccessTime() {
        return this.paySuccessTime;
    }
    
    public void setPaySuccessTime(OffsetDateTime paySuccessTime) {
        this.paySuccessTime = paySuccessTime;
    }
    public BigDecimal getAmount() {
        return this.amount;
    }
    
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }
    public Long getClientId() {
        return this.clientId;
    }
    
    public void setClientId(Long clientId) {
        this.clientId = clientId;
    }
    public OrderTypeEnum getType() {
        return this.type;
    }
    
    public void setType(OrderTypeEnum type) {
        this.type = type;
    }
    public PayStatusEnum2 getStatus() {
        return this.status;
    }
    
    public void setStatus(PayStatusEnum2 status) {
        this.status = status;
    }
    public OffsetDateTime getUpdateTime() {
        return this.updateTime;
    }
    
    public void setUpdateTime(OffsetDateTime updateTime) {
        this.updateTime = updateTime;
    }
    public String getReason() {
        return this.reason;
    }
    
    public void setReason(String reason) {
        this.reason = reason;
    }
    public String getReponseParams() {
        return this.reponseParams;
    }
    
    public void setReponseParams(String reponseParams) {
        this.reponseParams = reponseParams;
    }
    public String getRequestParams() {
        return this.requestParams;
    }
    
    public void setRequestParams(String requestParams) {
        this.requestParams = requestParams;
    }
    public String getExtParams() {
        return this.extParams;
    }
    
    public void setExtParams(String extParams) {
        this.extParams = extParams;
    }
    
}
